﻿<%@ Page Title="Cadastro Exercicio" Language="C#" MasterPageFile="~/gymmaster.Master" AutoEventWireup="true"
    CodeBehind="CadastroExercicio.aspx.cs" Inherits="GymMaster.View.Cadastro.CadastroExercicio" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table cellpadding="4" cellspacing="0" class="table" style="border-collapse: collapse;"
        align="center">
        <tr>
            <td align="center" colspan="2" class="titletable">
                Cadastro de Exercicio
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="lblExercicio" runat="server">Exercicio: </asp:Label>
            </td>
            <td align="left">
                <asp:TextBox ID="txtExercicio" runat="server" Width="250px" MaxLength="299"></asp:TextBox>
                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="txtExercicio"
                    ValidationGroup="CreateUserWizard1">* Campo obrigatório.</asp:RequiredFieldValidator>
            </td>
        </tr>
        <!-- Nome -->
        <tr>
            <td style="width: 45%" align="right">
                <asp:Label ID="lblTipoExerciocio" runat="server" Text="Tipo Exerciocio:"></asp:Label>
            </td>
            <td align="left">
                <asp:DropDownList ID="ddlTipoExercicio" runat="server" Width="250px" 
                    DataSourceID="EntityDataSource1" DataTextField="DESCRICAO" 
                    DataValueField="ID_TIPO_EXERCICIO">
                </asp:DropDownList>
                <asp:EntityDataSource ID="EntityDataSource1" runat="server" 
                    ConnectionString="name=GymMasterEntities" 
                    DefaultContainerName="GymMasterEntities" EnableFlattening="False" 
                    EntitySetName="TIPO_EXERCICIO" Select="it.[ID_TIPO_EXERCICIO], it.[DESCRICAO]">
                </asp:EntityDataSource>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlTipoExercicio"
                    ValidationGroup="CreateUserWizard1">* Campo obrigatório.</asp:RequiredFieldValidator>
            </td>
        </tr>
        <!-- TipoExercicio -->
        <tr>
            <td align="center" colspan="2">
                <asp:Button ID="btnCancelar" runat="server" CssClass="button" Text="Cancelar" />
                &nbsp&nbsp&nbsp&nbsp&nbsp
                <asp:Button ID="btnCadastrar" runat="server" CommandName="Submit" CssClass="button"
                    Text="Cadastrar" ValidationGroup="CreateUserWizard1"  OnClick="btnCadastrar_Click"/>
            </td>
        </tr>
    </table>
</asp:Content>
